﻿@model IEnumerable<PypinBoots.Models.empresa>

@{
    ViewBag.Title = "Empresas";
}
<div>

<h1>Empresas</h1>

</div>
<ul>
<a class="btn btn-primary" href="/Empresa/Create">Crear Nueva</a>
<br>
<br>
<table class="table table-striped table-bordered">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Nombre)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Direccion)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Telefono)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.EMail)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.RUC)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Borrado)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Nombre)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Direccion)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Telefono)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.EMail)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.RUC)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Borrado)
        </td>
        <td>
         <div class="btn-group">
                    <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
                        Acción
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu">
                        @{
                            <li>@Html.ActionLink("Editar", "Edit", new { id = item.IdEmpresa })</li>
                            <li>@Html.ActionLink("Detalles", "Details", new { id = item.IdEmpresa })</li>
                            <li class="divider"></li>
                            <li>@Html.ActionLink("Eliminar", "Delete", new { id = item.IdEmpresa })</li>
                               
                        }
                    </ul>
                </div>
        </td>
    </tr>
}

</table>
